import { createRouter, createWebHistory } from 'vue-router'

const routes = [
    {
        path: '/',
        name: 'Home',
        component: () => import('./views/Home.vue')
    },
    {
        path: '/about',
        name: 'About',
        component: () => import('./views/About.vue')
    },
    // 用于承载子应用的路由
    {
        path: '/sub-app/:pathMatch(.*)*',
        name: 'SubApp',
        component: () => import('./views/SubAppContainer.vue')
    }
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router
